<div class="form full">

	<?php
	$properties = array(
		'id'=>'comment-form',
		'enableAjaxValidation'=>true,
	);
	$form = $this->beginWidget('CActiveForm', $properties);
	?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'value');
		?>
		<?php
		echo $form->textArea($model, 'value', array('rows'=>6, 'cols'=>50));
		?>
		<?php echo $form->error($model, 'value'); ?>
	</div>

	<?php if (Yii::app()->user->isGuest): ?>

		<div class="row">
			<?php
			echo $form->labelEx($model, 'name');
			?>
			<?php
			echo $form->textField(
				$model, 'name', array('size'=>60, 'maxlength'=>255)
			);
			?>
			<?php echo $form->error($model, 'name');
			?>
		</div>

		<div class="row">
			<?php
			echo $form->labelEx($model, 'email');
			?>
			<?php
			echo $form->textField(
				$model, 'email', array('size'=>60, 'maxlength'=>128)
			);
			?>
			<?php echo $form->error($model, 'email');
			?>
		</div>

		<div class="row">
			<?php
			echo CHtml::activeLabel($model, 'reCaptcha');
			$config = array(
				'model'=>$model,
				'attribute'=>'reCaptcha',
				'theme'=>'red',
				'publicKey'=>Yii::app()->params['reCaptcha']['key']['public'],
			);
			$this->widget('EReCaptcha', $config);
			echo CHtml::error($model, 'reCaptcha');
			?>
		</div>
	
	<?php endif; ?>

	<div class="row buttons">
		<?php
		echo CHtml::submitButton($model->isNewRecord ? 'Submit' : 'Save');
		?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->